﻿
@if (Length > 1)
{
    <MPagination Value="@Value" Class="my-4" Length="@Length" ValueChanged="OnPageClick" ></MPagination>
}
@code {
    [Parameter]
    public int Length { get; set; }
    [Parameter]
    public int Value { get; set; }
    [Parameter]
    public EventCallback<int> ValueChanged { get; set; }

    private async Task OnPageClick(int pageIndex)
    {
        await ValueChanged.InvokeAsync(pageIndex);
    }
}
